/*
 *  txdnet.cn tonydon
 * 
 */
package cn.txdnet.txcms.domain;

import cn.txdnet.txweb.annotation.validation.CurrTime;
import cn.txdnet.txweb.annotation.validation.Default;
import cn.txdnet.txweb.annotation.validation.NotEmpty;
import cn.txdnet.txweb.annotation.validation.Size;
import cn.txdnet.txweb.annotation.validation.Validator;

/**
 *
 * @author txdnet
 */
public class HotWord extends BaseEntity{
    private static final long serialVersionUID = -651202617390040978L;
    
    private Long id;
    
    @Default
    private Integer cid;
    
    @Default("-")
    private String ctp;
    
    @NotEmpty
    @Size(min=1,max=32)
    private String word;
    
    @NotEmpty
    @Size(min=1,max=512)
    private String gotourl;
    
    @Default
    private Long hitnum;
    
    @CurrTime
    private Long pubtime;
    
    @Default
    private Long stoptime;
    
    @Default
    private Long ordernum;

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + (this.id != null ? this.id.hashCode() : 0);
        hash = 29 * hash + (this.word != null ? this.word.hashCode() : 0);
        hash = 29 * hash + (this.gotourl != null ? this.gotourl.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final HotWord other = (HotWord) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        if ((this.word == null) ? (other.word != null) : !this.word.equals(other.word)) {
            return false;
        }
        if ((this.gotourl == null) ? (other.gotourl != null) : !this.gotourl.equals(other.gotourl)) {
            return false;
        }
        return true;
    }
    

    @Override
    public boolean validate() {
        return Validator.validate(this);
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the cid
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * @param cid the cid to set
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * @return the ctp
     */
    public String getCtp() {
        return ctp;
    }

    /**
     * @param ctp the ctp to set
     */
    public void setCtp(String ctp) {
        this.ctp = ctp;
    }

    /**
     * @return the word
     */
    public String getWord() {
        return word;
    }

    /**
     * @param word the word to set
     */
    public void setWord(String word) {
        this.word = word;
    }

    /**
     * @return the gotourl
     */
    public String getGotourl() {
        return gotourl;
    }

    /**
     * @param gotourl the gotourl to set
     */
    public void setGotourl(String gotourl) {
        this.gotourl = gotourl;
    }

    /**
     * @return the hitnum
     */
    public Long getHitnum() {
        return hitnum;
    }

    /**
     * @param hitnum the hitnum to set
     */
    public void setHitnum(Long hitnum) {
        this.hitnum = hitnum;
    }

    /**
     * @return the pubtime
     */
    public Long getPubtime() {
        return pubtime;
    }

    /**
     * @param pubtime the pubtime to set
     */
    public void setPubtime(Long pubtime) {
        this.pubtime = pubtime;
    }

    /**
     * @return the ordernum
     */
    public Long getOrdernum() {
        return ordernum;
    }

    /**
     * @param ordernum the ordernum to set
     */
    public void setOrdernum(Long ordernum) {
        this.ordernum = ordernum;
    }

    /**
     * @return the stoptime
     */
    public Long getStoptime() {
        return stoptime;
    }

    /**
     * @param stoptime the stoptime to set
     */
    public void setStoptime(Long stoptime) {
        this.stoptime = stoptime;
    }
    
}
